import request from '@/utils/request';
import { PieList, PieListVo } from '@/api/pipelineNetworkRisk/types';
import { AxiosPromise } from 'axios';

//管网风险分级饼图数据
export function pipelineNetworkPieData() {
  return request({
    url: `/pipe/risk/statics`,
    method: 'post'
  });
}

//管网那个风险分级 根据类型获取列表
export function pipelineNetworkPieList(data: PieList): AxiosPromise<PieListVo[]> {
  return request({
    url: `/pipe/risk/staticsByType?type=` + data.type,
    method: 'post'
  });
}

//管网风险数据 根据类型获取列表
export function staticsList(query) {
  return request({
    url: `/pipe/risk/list`,
    method: 'get',
    params: query
  });
}
